﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Data;
using System.Data.Common;
namespace DataProvider
{
    public interface ISqlClient
    {
         DataTable Execute(SqlStatemate sqlStatement);
         DataSet ExecuteDataSet(SqlStatemate sqlStatement);

         DataTable Execute(String sql);

         DataTable PagelyExecute(SqlStatemate sqlStatement, int page, int itemCountPerPage);
         DataSet PagelyExecuteReturnDataSet(SqlStatemate sqlStatement, int page, int itemCountPerPage);

         DataTable PagelyExecuteStoreProcedure(String storedProc, int page, int itemCountPerPage, params DbParameter[] parameters);
         DataTable ExecuteStoreProcedureReturnTable(String storedProc,params DbParameter[] parameters) ;

         DataSet ExecuteStoreProcedureReturnDataSet(String storedProc, params DbParameter[] parameters);

         void ExecuteStoreProcedureNoQuery(String storedProc, params DbParameter[] parameters);

         String ExecuteStoreProcedureSingleString(String storedProc, params DbParameter[] parameters);
         void ExecuteNoResult(String sql);
         void ExecuteNoResult(SqlStatemate sqlStatement);

         void BatchExecute(IList<SqlStatemate> sqlStatementSet);
         String GetSingleResult(SqlStatemate sqlStatement);
         String GetSingleResult(String sql);

         DbDataReader ExecuteReader(SqlStatemate sqlStatement);

         DbDataReader ExecuteReader(SqlStatemate sqlStatement, ref DbCommand returnCmd);
         DbDataReader ExecuteReader(String sql);
         DbDataReader ExecuteReader(String sql, ref DbCommand returnCmd);
         DbDataReader ExecuteStoreProcedureReader(String storedProc, params DbParameter[] parameters);
         DbDataReader ExecuteStoreProcedureReader(String storedProc, ref DbCommand returnCmd, params DbParameter[] parameters);
         bool ExecuteTransaction(IList<SqlStatemate> sqlStatementSet);
         List<String> GetTableList();
         List<TableFieldInfo> GetFieldInfo(String tableName,params String[] reservedFields);
    }
}
